Skip to content

fix: contain unexpected CLI panics - #97

Merged
jsugg merged 1 commit into
mainfrom
fix/cli-panic-boundary
Oct 13, 2026
Merged

jsugg merged 1 commit into
mainfrom
fix/cli-panic-boundary

Conversation

@jsugg

@jsugg jsugg commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Changes

Catch unwinding panics at CLI entry and return the documented exit 70 with one
stderr line, atx: unexpected internal failure. Keep panic payloads, build paths,
and backtraces out of that diagnostic, including JSON and verbose requests.

Keep normal dispatch results and other threads' panic hooks unchanged. Do not
resume application work after a caught panic. A hostile panic payload destructor
cannot replace the intended failure with another panic.

Isolated process tests cover the panic exit and exact diagnostic, resource
cleanup, payload destructors, normal help/version/typed/JSON errors, and hook
scope. Both guides describe the panic exception and its unwind-only limit.

Checks

  • Failing-first dispatch regression and payload-guard mutation both detected
    exit 101 instead of 70. Restored implementation passes all seven focused tests.
  • Clean scripts/check.sh full at 1d194d0: 552 tests and all normal static,
    documentation, dependency, package, and publish-dry-run stages passed.
  • Fresh clean source archive at the exact head, extracted outside the workspace,
    with actual Rust 1.85 and a fresh consumer target: 461 bin tests passed,
    including all seven boundary tests. Source and VCS metadata match the head.
  • Both guides pass lint and offline links; all 12 JSON guide/value tests pass.

All required and additional current-head checks must pass before merge.
No publication, tags, repository settings, or branch cleanup.

Return exit 70 without exposing panic payloads or build paths.
Keep normal dispatch output and panic hooks on other threads unchanged.
@jsugg
jsugg merged commit 9f68a38 into main Oct 13, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant